package com.example.springbootagain.service;

import com.example.springbootagain.entity.User;
import com.example.springbootagain.mapper.UserMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserServiceImpl implements UserService{
    @Resource
    private UserMapper userMapper;
    @Override
    public List<User> ServiceSelectAllUser() {
        return userMapper.selectAllUser();
    }

    @Override
    public User SerViceSelectOneUser(String uid) {
        return userMapper.selectOneUser(uid);
    }

    @Override
    public int ServiceInsertUser(User user) {
        return userMapper.insertUser(user);
    }

    @Override
    public int ServiceUpdatePassword(User user) {
        return userMapper.updatePassword(user);
    }

    @Override
    public int ServiceDeleteUser(User user) {
        return userMapper.deleteUser(user);
    }

    @Override
    public User ServiceSelectLogin(String username, String password) {
        return userMapper.selectLogin(username, password);
    }

}
